<script>
import permissionListener from "@/utils/permissionListener.js";
export default {
	globalData: {
		statusBarHeight: 0, // 状态导航栏高度
		navHeight: 0, // 总体高度
		navigationBarHeight: 0, // 导航栏高度(标题栏高度)
	},
	onLaunch: function () {
		console.log("App Launch")

		// 状态栏高度
		this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight

		// #ifdef MP-WEIXIN
		// 获取微信胶囊的位置信息 width,height,top,right,left,bottom
		const custom = wx.getMenuButtonBoundingClientRect()
		// console.log(custom)

		// 导航栏高度(标题栏高度) = 胶囊高度 + (顶部距离 - 状态栏高度) * 2
		this.globalData.navigationBarHeight = custom.height + (custom.top - this.globalData.statusBarHeight) * 2
		// console.log("导航栏高度："+this.globalData.navigationBarHeight)

		// 总体高度 = 状态栏高度 + 导航栏高度
		this.globalData.navHeight = this.globalData.navigationBarHeight + this.globalData.statusBarHeight

		// #endif

	},
	onShow: function () {
		permissionListener && permissionListener.listenerFunc();
	},
	onHide: function () {
		permissionListener && permissionListener.stopFunc();
	}
}
</script>

<style>
/* 隐藏滚动条，但仍允许滚动 */
/deep/::-webkit-scrollbar {
	width: 0 !important;
	height: 0 !important;
	color: transparent;
	overflow-x: hidden !important;
	overflow-y: auto !important;
}

/deep/.uicon-close {
	margin-top: 2px !important;
	font-size: 13px !important;
	line-height: 10px !important;
}

/*每个页面公共css */
/* 圆角设置 */
checkbox.round .wx-checkbox-input,
checkbox.round .uni-checkbox-input {
	border-radius: 100rpx;
	/* width: 15px;
			height: 15px; */
}

/* 背景色设置 */
checkbox.red[checked] .wx-checkbox-input,
checkbox.red.checked .uni-checkbox-input {
	background-color: #0094FF !important;
	border-color: #0094FF !important;
	color: #ffffff !important;
}
</style>